x86/mm/shadow: adjust early-unshadow heuristic for PAE guests.
authorTim Deegan <Tim.Deegan@citrix.com>
Mon, 20 Jun 2011 12:16:14 +0000 (13:16 +0100)
committerTim Deegan <Tim.Deegan@citrix.com>
Mon, 20 Jun 2011 12:16:14 +0000 (13:16 +0100)
commit43d588d6ae73cf75f5f7efa3a98bfa243e7e6424
treebeef1568e06e2d0fa6f1da6079b927a58c5becba
parenta51d11c6e8fbfe88e54fca90d20cb7e6eea2d896
x86/mm/shadow: adjust early-unshadow heuristic for PAE guests.

PAE guests have 8-byte PTEs but tend to clear memory with 4-byte writes.
This means that when zeroing a former pagetable every second 4-byte
write is unaligned and so the consecutive-zeroes --> unshadow
heuristic never kicks in.  Adjust the heuristic not to reset when
a write is >= 4 bytes and writing zero but not PTE-aligned.

Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
xen/arch/x86/mm/shadow/multi.c